import service from "@/utils/request";
const DEPT_BASE_URL = "/api/";
import {lambweanQuery} from "../Ablactationment/model"
//羔羊断奶
class LambWean{
  //获取羔羊断奶信息
  static getLambWeanList(params: lambweanQuery) {
    return service({
      url: `${DEPT_BASE_URL}Lambweaninginfo/GetLambweaninginfos`,
      method: "post",
      data: params,
    });
  }
  //羔羊断奶删除
  static deltetes(ids:any[])
  {
    return service({
      url: `${DEPT_BASE_URL}Lambweaninginfo/DelLambweaninginfos`,
      method: "post",
      data:ids
    });
  }
  //羔羊断奶添加
  static addLambWean(data: any)
  {
    return service({
      url: `${DEPT_BASE_URL}Lambweaninginfo/AddLambweaninginfo`,
      method: "post",
      data
    });
  }
  //反填羔羊断奶
  static detilLambWean(eartag: any)
  {
    return service({
      url: `${DEPT_BASE_URL}Lambweaninginfo/DteilLambweaninginfo`,
      method: "get",
      params: {
        eartag:eartag
      }
    });
  }
  //根据id获取栋舍
  static getHouse(rig: any)
  {
    return service({
      url: `${DEPT_BASE_URL}Ridgepoles/GetRidgepoles`,
      method: "get",
      params: {
        rig:rig
      }
    });
  
  }
  //修改羔羊断奶
  static updateLambWean(data: any)
  {
    return service({
      url: `${DEPT_BASE_URL}Lambweaninginfo/UpdateLambweaninginfo`,
      method: "put",
      data
    });
  }
}
export default LambWean;